![]() |
KCNewItem |
||||
Header: | Keychain.h | Carbon status: | Under Evaluation | |
Creates a reference to a keychain item.
OSStatus KCNewItem ( KCItemClass itemClass, OSType itemCreator, UInt32 length, const void *data, KCItemRef *item );
The type of item (that is, a certificate, AppleShare password, Internet password, or generic password) that you want to create. See
The creator code of the application that owns this item.
The length of the data to be stored in this item.
A pointer to a buffer containing the data to be stored in this item. Before calling KCNewItem, allocate enough memory for the buffer to hold the data you want to store.
On return, a pointer to a reference to the newly-created item.
A result code. The Memory Manager result code memFullErr indicates that you did not allocate enough memory in the current heap to create the item.
The KCNewItem function creates a new keychain item from the specified parameters. Note that a copy of the data buffer pointed to by data is stored in the item.
If you want to store an item permanently, you must call the function KCAddItem after calling KCNewItem. When the item reference is no longer required, call the function KCReleaseItem to deallocate memory occupied by the item.
Available beginning with Keychain Manager 1.0.
Under evaluation for Carbon. Available in CarbonLib 1.0 and later when KeychainLib 1.0 or later is installed. Exported by CarbonLib 1.0 and later and by KeychainLib 1.0 and later.
© 2000 Apple Computer, Inc. — (Last Updated 4/14/2000)